﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="WanPiJie.WebSite.MyBaby.Index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>我的宝宝-顽皮街</title>
	<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.19/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
	<link href="http://static.wanpijie.com/styles/global.css" rel="stylesheet" type="text/css" />
	<link href="http://static.wanpijie.com/styles/www.css" rel="stylesheet" type="text/css" />
	<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.min.js" type="text/javascript"></script>
	<script src="http://static.wanpijie.com/scripts/jquery.cookie.min.js" type="text/javascript"></script>
	<script src="http://static.wanpijie.com/scripts/global.js" type="text/javascript"></script>
	<script language="c#" runat="server">
		int x = 0;
		string GetCatalogStatusCss(int catalogId)
		{
			return catalogId == this.CatalogId ? "active" : "";
		}
	</script>
	<script type="text/javascript">
		function changeBorderColor(_this, color) {
			_this.style.borderColor = color;
		}
	</script>
	<style type="text/css">
		.box-list li.box {
			padding: 5px 6px;
		}
	</style>
</head>
<body>
	<form id="form1" runat="server">
	<wpj:SiteHeader ID="SiteHeader" runat="server" />
	<div id="mainContent" class="wrap">
		<div class="main-panel">
			<div class="baby-info b">
				<h2 class="title">
					欢迎你，<%= this.Baby.Name %></h2>
				<p class="box2-p">
					你已经<span style="color: #0066CC;"><%= BabyExtension.GetAgeInfo(this.Baby)%></span>大了, 是一个健康聪明的<%= BabyExtension.GetGenderInfo(this.Baby) %>!
				</p>
				<p class="box2-p">
					<% if (this.LastGrowthRecord != null) %>
					<% { %>
					身高：<%= this.LastGrowthRecord.Height %>
					厘米，体重：<%= this.LastGrowthRecord.Weight %>千克 （<%= this.LastGrowthRecordFromDays %>天 前更新）
					<% if (this.LastGrowthRecordFromDays >= 30) %>
					<% { %>
					<a class="btn" href="AddGrowthRecord.aspx"><span>立刻更新</span></a>
					<% } %>
					<% } %>
					<% else %>
					<% { %>
					你尚未给宝添加成长记录，<a class="btn" href="AddGrowthRecord.aspx"><span>马上添加</span></a>
					<% } %>
				</p>
			</div>
			<div class="baby-tip b">
				<h2 class="title">
					宝宝的成长发育</h2>
				<p class="box2-p">
					<% 
						if (this.GrowthIndicator != null)
						{
							if (!String.IsNullOrEmpty(this.GrowthIndicator.Summary))
							{
								Response.Write(this.GrowthIndicator.Summary);
							}
							else if (!String.IsNullOrEmpty(this.GrowthIndicator.Action))
							{
								Response.Write(this.GrowthIndicator.Action);
							}
						} 
					%>
				</p>
			</div>
			<div class="product-header" style="overflow: hidden; margin-top: 20px;">
				<h2 class="title" style="float: left; padding-left: 10px;">
					适合宝宝的商品</h2>
				<ul class="pdt-catalog" style="float: right">
					<li><a href="Index.aspx?cid=1" class="<%= this.GetCatalogStatusCss(1) %>">奶粉 </a></li>
					<li><a href="Index.aspx?cid=2" class="<%= this.GetCatalogStatusCss(2) %>">奶瓶</a></li>
					<li><a href="Index.aspx?cid=3" class="<%= this.GetCatalogStatusCss(3) %>">奶嘴</a></li>
					<li><a href="Index.aspx?cid=4" class="<%= this.GetCatalogStatusCss(4) %>">尿不湿</a></li>
				</ul>
				<ul class="box-list">
					<asp:Repeater ID="rptProductList" runat="server">
						<ItemTemplate>
							<li onmousemove="changeBorderColor(this,'#FF6600');" onmouseout="changeBorderColor(this,'#CCCCCC');" class="box <%= (++x % 4 == 1 ? "first" : "") %>"><a href="../Products/Detail.aspx?ItemId=<%# Eval("SerialNumber") %>" target="_blank">
								<img src="http://static.wanpijie.com/Pdt/<%#Eval("CatalogId")%>/<%# Eval("SerialNumber")%>/168-168.jpg" width="168px" height="168px" alt="<%# Eval("Title")%>" />
							</a>
								<ul class="attribute">
									<li class="trade-num">♥
										<%# Eval("Volume") %></li>
									<li class="price">￥<%# Eval("Price") %></li>
								</ul>
								<span><a href="../Products/Detail.aspx?ItemId=<%# Eval("SerialNumber") %>" target="_blank">
									<%# Eval("Title") %>
								</a></span></li>
							</li>
						</ItemTemplate>
					</asp:Repeater>
				</ul>
			</div>
		</div>
		<div class="panel">
			<wpj:UserPanel ID="UserPanel" runat="server" />
		</div>
	</div>
	<wpj:SiteFooter ID="SiteFooter" runat="server" />
	</form>
</body>
</html>
